package com.example.njupt.sqllite.entity;

import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.io.Serializable;

/**
 * Author:      mwang
 * Create Date: Created in 2021/5/24 11:47
 * Update Date:
 * Modified By:
 * Description:
 */
@Entity(tableName = "person_table")
public class PersonEntity implements Serializable {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "personId")
    int personId;
    @ColumnInfo(name = "personName")
    String personName;

    @Embedded
    ExperimentEntity experimentEntity;

    public PersonEntity(int personId, String personName, ExperimentEntity experimentEntity) {
        this.personId = personId;
        this.personName = personName;
        this.experimentEntity = experimentEntity;
    }

    public int getPersonId() {
        return personId;
    }

    public void setPersonId(int personId) {
        this.personId = personId;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public ExperimentEntity getExperimentEntity() {
        return experimentEntity;
    }

    public void setExperimentEntity(ExperimentEntity experimentEntity) {
        this.experimentEntity = experimentEntity;
    }
}
